//
//  messageInfo.m
//  cocoapodText
//
//  Created by apple on 16/9/16.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "messageInfo.h"
#import <Foundation/Foundation.h>

@implementation messageInfo

-(instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        //使用KVC
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}

/**
 *  工厂方法
 *
 *  @param dict 字典
 *
 *  @return 模型
 */
+(instancetype)messageInfoWithDict:(NSDictionary *)dict
{
    return [[self alloc]initWithDict:dict];
}

/**
 *  工厂方法
 *
 *  @param dict 字典
 *
 *  @return 模型
 */
+(instancetype)messageInfoWithName:(NSString *)name type:(NSString *)type time:(NSString *)time content:(NSString *)content number:(NSString *)number number2:(NSString *)number2 color:(NSString *)color status:(NSString *)status{
    NSDictionary *dict = @{@"Name":name,@"Type":type,@"Time":time,@"Content":content,@"Number":number,@"Number2":number2,@"Color":color,@"Status":status};
    return [[self alloc]initWithDict:dict];
}

@end
